import { action, observable } from 'mobx';
import { WeaTableNew } from 'comsMobx';
import * as Api from '../../apis/docWorkflowApi/openModelApi';

const TableStore = WeaTableNew.TableStore;

export default class OpenModelStore {
  @observable tableStore = new TableStore();

  @action.bound
  getList(workflowid, selectvalue, iseditmould) {
    const params = {
      selectvalue,
      workflowid,
      iseditmould,
    };
    Api.getList(params).then((data) => {
      if (data.api_status) {
        this.tableStore.getDatas(data.sessionkey);
      }
    });
  }
}
